package com.boge.study.test.design_pattern.observer;

import java.util.Observable;
import java.util.Observer;

public class ConcreteObserver implements Observer {
	String observerName;
	
	public String getObserverName() {
		return observerName;
	}
	
	public void setObserverName(String observerName) {
		this.observerName = observerName;
	}

	@Override
	public void update(Observable o, Object arg) {
		System.out.println(observerName + "收到了消息，消息是:" + ((ConcreteWeatherSubject)o).getContent());
	}

}
